Skip to main content

Connect

AutomatR.PostgreSQL.Database.Connect

The "Connect" activity in AutomatR facilitates the connection to a specified PostgreSQL database. This activity is crucial for establishing a connection that can be utilized by subsequent database-related activities.

Properties

NameDescription
Input
SourceSpecify the source path for the PostgreSQL database. String variables containing the source path.
PortSpecify the port number for the PostgreSQL database. Integer variables containing the port number.
DataBase NameSpecify the name of the PostgreSQL database to connect with. String variables containing the database name.
UserNameProvide the username for the PostgreSQL database. String variables containing the username.
PasswordProvide a password for the specified username to connect to the PostgreSQL database. String variables containing the password.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Connect" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ConnectionOutputs the result as an NpgsqlConnection variable, which can be used for further database activities. Variables of type NpgsqlConnection to store the connection.

How to use:

  1. Drag and drop the "Connect" activity onto the workflow.
  2. Configure the properties by specifying the source path, port, database name, and optionally, the username and password for the PostgreSQL database.
  3. Optionally, configure the delay.
  4. Execute the workflow to establish a connection to the specified PostgreSQL database.

Example: Consider an example where the "Connect" activity is used to connect to a PostgreSQL database:

Connect:
Delay: 2
Source: "localhost"
Port: 5432
DataBase Name: "mydatabase"
UserName: "user"
Password: "password"
Connection: myDBConnection

In this example, the activity establishes a connection to the "mydatabase" PostgreSQL database on the local machine with a 2-second delay. The connection information, including the username and password, is provided, and the result is stored in the NpgsqlConnection variable "myDBConnection" for further database-related activities.